home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / MacApp Documentation / MacApp.TECH$ Archives / 1990 / Oct 90 / MacApp.Tech$ 10⁄12⁄90 / 2177-Re MacApp 2.0b5 vs M-Oct90 < prev    next >
Encoding:
Text File  |  1991-03-06  |  1.5 KB  |  46 lines  |  [TEXT/GEOL]

  1. Item    0233256                         12-Oct-90        12:27PDT
  2.  
  3. From:   PHAROS.TECH                     Pharos Tech, Tech Staff,PRT
  4.  
  5. To:     MACAPP.TECH$                    MacApp Technical
  6.  
  7. Sub:    RE: MacApp 2.0b5 vs MPW 3.1?
  8.  
  9. From: Schmitz, Scott D. on Fri, Oct 12, 1990 3:28 PM
  10. Subject: RE: MacApp 2.0b5 vs MPW 3.1?
  11. To: MacApp
  12.  
  13. It's like this.
  14.  
  15. Earlier versions of MacApp (Pre 2.0 final) used an earlier version of the
  16. Pascal compiler (Pre 3.1).  The current version of the Pascal compiler does
  17. some extra syntax checking.  One of the things it checks for is unsafe handle
  18. usage.  Due to the new Pascal compiler the MacApp team found and fixed a few
  19. problems.  You have a version of MacApp which is before those fixes were made.
  20.  
  21. I would recommend that you get the 2.0 final version of MacApp.
  22.  
  23. The problem that you encountered occurrs typically when you pass in an object
  24. variable which is greater than 4 bytes as a paramater into a procedure.  For
  25. example:
  26.  
  27. StrConcat(fView.Name);
  28.  
  29. would blow chunks if Name was a Str255 and fView was an object reference.
  30.  
  31. To get around this, use a temporary variable.
  32.  
  33. For example:
  34.  
  35. SillyStr := fView.Name;
  36. StrConcat(SillyStr);
  37. fView.Name := SillyStr;  { Only needed if StrCat passed SillyStr in as a VAR}
  38.  
  39. The problem occurrs because objects are really handles and the Pascal compiler
  40. dereferences the handle when you pass in a variable of larger than 4 bytes into
  41. a procedure or pass in a variable of any size as a VAR paramater.
  42.  
  43. Scott.
  44.  
  45.  
  46.